package main

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"
)

const appName = "mybg"

func fatalf(format string, args ...any) {
	fmt.Fprintf(os.Stderr, format, args...)
	os.Exit(1)
}

func main() {
	appCmds := &cobra.Command{
		Use:   appName,
		Short: "mysql boilerplate generator",
	}

	appCmds.AddCommand(configCommand())
	appCmds.AddCommand(modelCommand())
	appCmds.AddCommand(daoCommand())

	err := appCmds.Execute()
	if err != nil {
		os.Exit(1)
	}
}
